flow box: Avoid a critical in keynav
authorMatthias Clasen <mclasen@redhat.com>
Wed, 26 Aug 2015 23:57:15 +0000 (19:57 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 27 Aug 2015 00:00:40 +0000 (20:00 -0400)
We were not taking into account that gtk_flow_box_get_next_focusable
can return NULL, in all callers. Fix that.

gtk/gtkflowbox.c

index c19130e6af1a22e7f3e670f55ae9e4b17083afcf..8b65d65ecfc897a7571ee14d4e181136834069f3 100644 (file)
@@ -3459,7 +3459,7 @@ gtk_flow_box_move_cursor (GtkFlowBox      *box,
               while (!g_sequence_iter_is_end (iter))
                 {
                   iter = gtk_flow_box_get_next_focusable (box, iter);
-                  if (g_sequence_iter_is_end (iter))
+                  if (iter == NULL || g_sequence_iter_is_end (iter))
                     break;
 
                   next = g_sequence_get (iter);